-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Ferry url params between pages #14138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ferry url params between pages #14138
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
DO NOT MERGE until tested & approval from legal. |
Bundle ReportChanges will decrease total bundle size by 2.0kB (-0.01%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
Files in
Files in
Files in
App Routes Affected:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
Files in
Files in
App Routes Affected:
|
URL parameter ferrying was implemented to preserve specific parameters across page navigations.
src/utils.ts, theparamsToSyncarray was updated to[/^utm_/i, /^promo_/i, /code/, /ref/]to match the desired patterns.ferryUrlParams, was added tosrc/utils.tsto extract and append these parameters to a given URL.SmartLink(src/components/smartLink.tsx) andNavLink(src/components/navlink.tsx) components were updated to utilizeferryUrlParams, ensuring internal links automatically include the ferried parameters.ParamFerryclient component (src/components/paramFerry.tsx) was created. This component uses aMutationObserverto automatically process all internal links on a page, including dynamically added ones, by applying the ferried parameters. It intelligently skips external, anchor, mailto, and tel links.ParamFerrycomponent was integrated into the root layout (app/layout.tsx), enabling sitewide parameter ferrying without additional setup.